package com.xuchaotong.zk.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;

/**
 * @author 311633
 * @version 1.0
 * @ClassName:
 * @Description:
 * @date 2017/11/20 10:45
 */
public class ZkClient {

    private static final Logger LOG = LoggerFactory.getLogger(ZkClient.class);

    public static void main(String[] args) {
        NodeWatcher nodeWatcher = new NodeWatcher();
        nodeWatcher.monitorMaster();

        Thread thread = new Thread(new Runnable() {
            public void run() {
                while (true) {
                    try {
                        Thread.sleep(5000);
//                        LOG.info("this is zkclient...");
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        });

        thread.start();
    }

}
